<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .tab {
            width: 500px;
            height: 500px;
            border: 1px solid #000;
            margin: 0 auto;
            overflow: hidden;
        }

        .tab .tab-wrapper {
            height: 50px;
            border-bottom: 1px solid #000;

        }

        .tab .tab-item {
            float: left;
            width: 25%;
            height: 100%;
            text-align: center;
            line-height: 50px;
        }

        .tab .tab-item.active {
            background: cornflowerblue;
            color: white;
        }

        .tab .page-wrapper {
            position: relative;
            height:450px;
        }

        .tab .fade .inner {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .tab.fade .page-item{
            display: none;
            position: absolute;
            top: 0;
            left: 0;
        }

        .tab.fade .page-item.active{
            display: block;
        }

        .tab.slide .inner {
            position: absolute;
            top: 0;
            left: 0;
            width: 2000px;
            height: 100%;
            transition: transform  .3s;
        }

        .tab .page-item {
            width: 500px;
            height: 100%;
            text-align: center;
            line-height: 450px;
            font-size: 100px;
        }

        .tab.slide .page-item{
            display: block;
            width: 500px;
            height: 100%;
            float: left;
        }

    </style>
</head>

<body>
    <div class="tab slide">
        <div class="tab-wrapper">
            <div class="tab-item active">选项1</div>
            <div class="tab-item">选项2</div>
            <div class="tab-item">选项3</div>
            <div class="tab-item">选项4</div>
        </div>
        <div class="page-wrapper">
            <div class="inner">
                <div class="page-item  active">选项页1</div>
                <div class="page-item">选项页2</div>
                <div class="page-item">选项页3</div>
                <div class="page-item">选项页4</div>
            </div>
        </div>
    </div>
    <script src="./src/index.ts" type="module"></script>
</body>

</html>